home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
DATAUTIL
/
DBASEUT1.LZH
/
DWTDATA.PRG
< prev
next >
Wrap
Text File
|
1985-09-08
|
9KB
|
230 lines
* dwtdata.prg *
* main = dwt
do while .t.
* display screen *
@ 01,00 say '▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒'
@ 02,00 say '▒▒ ╔═══════════════╗ ▒▒ ╔══════════════════════════════════════════════════╗ ▒▒'
@ 03,00 say '▒▒ ║ DATA BASE ║ ▒▒ ║ ║ ▒▒'
@ 04,00 say '▒▒ ╟───────────────╢ ▒▒ ║ Customer Master File ║ ▒▒'
@ 05,00 say '▒▒ ║ Help ║ ▒▒ ║ ┌────────────────────────────────────────────┐ ║ ▒▒'
@ 06,00 say '▒▒ ║ Update ║ ▒▒ ║ │Customer name..... │ ║ ▒▒'
@ 07,00 say '▒▒ ║ ║ ▒▒ ║ │Customer number... │ ║ ▒▒'
@ 08,00 say '▒▒ ║ ║ ▒▒ ║ └────────────────────────────────────────────┘ ║ ▒▒'
@ 09,00 say '▒▒ ║ ║ ▒▒ ║ ║ ▒▒'
@ 10,00 say '▒▒ ║ ║ ▒▒ ║ ┌────────────────────────────────────────────┐ ║ ▒▒'
@ 11,00 say '▒▒ ║ ║ ▒▒ ║ │Address........... │ ║ ▒▒'
@ 12,00 say '▒▒ ║ ║ ▒▒ ║ │Address........... │ ║ ▒▒'
@ 13,00 say '▒▒ ║ ║ ▒▒ ║ │City, State, Zip.. │ ║ ▒▒'
@ 14,00 say '▒▒ ║ ─┘ to quit ║ ▒▒ ║ │Telephone......... │ ║ ▒▒'
@ 15,00 say '▒▒ ╚═══════════════╝ ▒▒ ║ │Comments: │ ║ ▒▒'
@ 16,00 say '▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ║ └────────────────────────────────────────────┘ ║ ▒▒'
@ 17,00 say '▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ║ ║ ▒▒'
@ 18,00 say '▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ║ ║ ▒▒'
@ 19,00 say '▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ║ ║ ▒▒'
@ 20,00 say '▒▒ ╔═══════════════╗ ▒▒ ║ ║ ▒▒'
@ 21,00 say '▒▒ ║ ║ ▒▒ ║ ║ ▒▒'
@ 22,00 say '▒▒ ╚═══════════════╝ ▒▒ ╚══════════════════════════════════════════════════╝ ▒▒'
@ 23,00 say '▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒'
* prompt for action *
store ' ' to action
@ 21,05 say 'Selection?'get action picture 'A'
read
clear gets
@ 21,04 say ' '
store UPPER(action) to action
* go for case *
do case
* quit and repaint background *
case action='Q' .or. action=' '
return
* display help screen *
case action='H'
@ 21,04 say ' Stand by... '
@ 03,10 say '╔═════════════════════════════════════════════════════════╗'
@ 04,10 say '║ d/WT may be configured to meet your own specifications ║'
@ 05,10 say '║ by simply using this system of command files as a pat- ║'
@ 06,10 say '║ tern for new applications. ║'
@ 07,10 say '║ ║'
@ 08,10 say "║ Press 'U' to update this example data base. If a key is ║"
@ 09,10 say '║ not found d/WT will ask if you wish to add the new key ║'
@ 10,10 say '║ to the data base. If the key is found, d/WT will dis- ║'
@ 11,10 say '║ play the record, and ask if you want to edit the infor- ║'
@ 12,10 say '║ mation located. ║'
@ 13,10 say '║ ║'
@ 14,10 say "║ Press <CR> to abort any function at any time. ║"
@ 15,10 say '║ ║'
@ 16,10 say '║ ║'
@ 17,10 say '╚═════════════════════════════════════════════════════════╝'
* prompt to continue *
store ' ' to continue
@ 21,05 say 'Any key...' get continue
read
clear gets
@ 21,04 say ' Stand by... '
* update *
case action='U'
select 1
* display file and date window *
store .t. to control
do while control
* display option panel *
@ 05,05 say 'Upper case or'
@ 06,05 say ' lower case '
@ 07,05 say ' is permitted'
@ 08,05 say ' '
@ 09,05 say ' '
* prompt for key *
store ' ' to keym
@ 21,04 say ' Enter key... '
@ 06,46 get keym picture 'XXXXXXXXXXXXXXXXXXXXXXXX'
read
clear gets
@ 21,04 say ' '
* done? *
if SUBSTR(keym,1,1)=' '
@ 21,04 say ' Stand by... '
store .f. to control
loop
loop
endif
* get key requested *
store trim(UPPER(keym)) to keym
find &keym
* if not found *
if (EOF() .OR. BOF())
@ 09,10 say '╔════════════════════════════╗'
@ 10,10 say '║ ║'
@ 11,10 say '║ ║'
@ 12,10 say '╚════════════════════════════╝'
@ 10,13 say keym
store ' ' to action
@ 11,13 say "Doesn't exis, add? (y/n) " get action picture 'A'
read
clear gets
store UPPER(action) to action
@ 09,00 say '▒▒ ║ ║ ▒▒ ║ '
@ 10,00 say '▒▒ ║ ║ ▒▒ ║ ┌────────────'
@ 11,00 say '▒▒ ║ ║ ▒▒ ║ │Address.....'
@ 12,00 say '▒▒ ║ ║ ▒▒ ║ │Address.....'
* if addition is desired *
if action='Y'
appe blank
replace key with keym
else
loop
endif
else
store key to keym
* display record *
@ 06,46 say ' '
@ 06,46 say keym
@ 07,46 say custnumb
@ 11,46 say addr1
@ 12,46 say addr2
@ 13,46 say city
@ 14,46 say phone picture '(999) 999-9999'
@ 15,37 say comments
* display option panel *
if DELETE()
@ 05,05 say 'Recall '
@ 06,05 say ' '
else
@ 05,05 say 'Edit '
@ 06,05 say 'Delete '
endif
@ 07,05 say ' '
@ 08,05 say ' '
@ 09,05 say ' '
* show deleted record *
if DELETE()
@ 09,10 say '╔════════════════════════════╗'
@ 10,10 say '║ ║'
@ 11,10 say '║ ║'
@ 12,10 say '╚════════════════════════════╝'
@ 10,12 say keym
@ 11,12 say "** MARKED FOR DELETION **"
endif
* prompt for action *
store ' ' to action
@ 21,04 say ' Selection? ' get action picture 'A'
read
clear gets
store UPPER(action) to action
* recall record *
if action='R'
recall
endif
if DELETE()
store ' ' to action
endif
* mark record for deletetion *
if action='D'
delete
endif
@ 21,04 say ' Stand by... '
endif
* get input screen *
if action='Y' .or. action='E'
* display option panel *
@ 05,05 say 'CTRL Q to '
@ 06,05 say ' abandon... '
@ 07,05 say ' '
@ 08,05 say 'CTRL W to '
@ 09,05 say ' save... '
@ 14,05 say ' '
@ 21,04 say ' Editing... '
@ 06,46 say keym
@ 07,46 get custnumb
@ 11,46 get addr1
@ 12,46 get addr2
@ 13,46 get city
@ 14,46 get phone picture '(999) 999-9999'
@ 15,37 get comments
read
clear gets
@ 21,04 say ' Stand by... '
endif
* clear data path *
@ 06,46 say ' '
@ 07,46 say ' '
@ 11,46 say ' '
@ 12,46 say ' '
@ 13,46 say ' '
@ 14,46 say ' '
@ 15,37 say ' '
@ 09,00 say '▒▒ ║ ║ ▒▒ ║ '
@ 10,00 say '▒▒ ║ ║ ▒▒ ║ ┌────────────'
@ 11,00 say '▒▒ ║ ║ ▒▒ ║ │Address.....'
@ 12,00 say '▒▒ ║ ║ ▒▒ ║ │Address.....'
enddo
endcase
enddo